package org.example.command;

import org.example.model.HTMLDocument;

public class InitCommand implements Command {
    private HTMLDocument htmlDocument;

    private InitCommand(HTMLDocument htmlDocument) {
        this.htmlDocument = htmlDocument;
    }

    public static InitCommand create(HTMLDocument htmlDocument) {
        return new InitCommand(htmlDocument);
    }

    @Override
    public boolean execute() {
        this.htmlDocument.init();

        System.out.println("HTML document has been initialized.");
        return true;
    }
}
